\documentclass[12pt]{article}
\usepackage{graphicx}
\pagestyle{empty}
\setcounter{secnumdepth}{2}

\topmargin=0cm
\oddsidemargin=0cm
\textheight=22.0cm
\textwidth=16cm
\parindent=0cm
\parskip=0.15cm
\topskip=0truecm
\raggedbottom
\abovedisplayskip=3mm
\belowdisplayskip=3mm
\abovedisplayshortskip=0mm
\belowdisplayshortskip=2mm
\normalbaselineskip=12pt
\normalbaselines

\begin{document}

\vspace*{0.5in}
\centerline{\bf\Large Requirements Document}

\vspace*{0.5in}
\centerline{\bf\Large Team 4}

\vspace*{0.5in}
\centerline{\bf\Large 5 February 2012}

\vspace*{1.5in}
\begin{table}[htbp]
\begin{center}
\begin{tabular}{|r | c|}
\hline
Name & ID Number \\
\hline\hline
Alex Attar & 9609695 \\
\hline
Kevin Carrington & 9470034 \\
\hline
Kevin El Hage & 9765727 \\
\hline
Jaime Francisco Jaramillo & 9272518 \\
\hline
Jimmy Nguyen & 5493277 \\
\hline
Scott Renaud & 9354891 \\
\hline
\end{tabular}
\end{center}
\end{table}

\clearpage

\section{System}

\subsection{Purpose}
The purpose of this document is to define the requirements for \textit{the task management system}. The intended audience of this document is described in Table 1.
\begin{table}[h]
\begin{tabular}{|l|l|}
\hline
\textbf{Group of the readers} & \textbf{Reasons for reading} \\
\hline
Users and customers & To give feedback about the requirements. \\
System Developers & To understand what functions and properties the system must contain .\\
Testers & To test the system against the requirements. \\
Writers of user manuals & To get material for user manuals. \\
Project team & To follow-up the status of the project against the requirements.\\
\hline
\end{tabular}
\caption{Intended audience of this document}
\label{tab:}
\end{table}

\subsection{Context}

\begin{figure}[htb]
\begin{center}
\includegraphics{ContextDiagram}
\caption{Context Diagram of Task Management System.}
\end{center}
\end{figure}

  
\subsection{Business Goals}
Without a task management system with different views, it would be difficult to
track progress on employee’s tasks, and the management could assign tasks that 
conflict with an employee's other tasks, thus creating confusion.

Implementing the task management system would allow the user to access the
task view, where each task has an identifier, a title, a description, a duration, a
deliverable, a deadline date, and a person assigned to the task. Tasks could also be
edited.

This would allow the administration to keep track of the progress of the company’s 
employees, and thus assign tasks more efficiently. This system would also benefit the
employees, as they can check on the time they have to complete a specific task, and
thus work more efficiently.

\pagebreak

\section{Domain Concepts}

\begin{table}[h]
\begin{tabular}{|p{1in}|p{5in}|}
\hline
\textbf{Concept} & \textbf{Description} \\
\hline
User & The user of the system. \\
\hline
Role Selection & The screen where the user is able to chose their role on the project. Either "Manager" or "Employee" may be selected. \\
\hline
Task Management System & The main system with which the user interacts. Tasks are managed and viewed here. \\
\hline
Tree View & A list of all tasks organized in a tree-like structure, displaying the relation between tasks and their sub-tasks. \\
\hline
Task View & A detailed view of the task selected from the Tree View and its sub-tasks. \\
\hline
Person View & A view describing the people related to the selected tasks and tasks assigned to them. \\
\hline
Gantt View & A Gantt chart displaying the selected tasks in a timeline. \\
\hline
Load & The system reads from a file and creates tasks according to that file's specifications. \\
\hline
Save & The system writes the information for each task to a file. This file may later be read by the system using the "Load" function. Additionally a file containing information regarding the people assigned to the tasks is created. \\
\hline
Tasks File & A file containing information regarding tasks in a format readable by the system. It is created by the "Save" function and read with the "Load" function. \\
\hline
Person File & A file containing information regarding the people assigned to tasks. It is created at the same time as the Tasks File by the "Save" function. \\
\hline
\end{tabular}
\end{table}

\begin{figure}[htb!]
\begin{center}
\includegraphics{DomainConcepts}
\caption{Diagram of the domain concepts}
\end{center}
\end{figure}

\newpage
\section{Actors}
\begin{enumerate}
\item Project Manager - able to Create/Assign/Modify tasks
\item Employee - able to View/Complete tasks
\end{enumerate}

\pagebreak

\section{Use Cases}

\subsection{Overview}
The system is a task management application. It is capable of adding, editing and removing tasks from a project, as well as tracking those tasks. Each task can contain several sub-tasks. In addition, tasks can be given dependencies such that a certain task may not be completed until another task is. The system allows each task's information to be viewed and modified directly. The viewable list of tasks can be specified by using the hierarchal tree ciew. As well, a view containing the people working on any given task is available which enumerates the tasks for which that person is responsible. Finally a GANTT chart is available to visualize the time taken by each task.

\begin{figure}[htbp]
%insert diagram here
\caption{Use Case Diagram}
\label{fig:use-case-diagram}
\end{figure}

\subsubsection{Summary List}

\begin{table}[h]
\begin{tabular}{|p{2.5cm}|p{10cm}|}
\hline
\textbf{Use Case} & \textbf{Name} \\
\hline
Use Case 1 & Starting the system\\
\hline
Use Case 2 & Load the tasks file\\
\hline
Use Case 3 & View list of Tasks\\
\hline
Use Case 4 & Select a Task\\
\hline

 & View Tasks\\
\hline
Use Case 6 & View Persons\\
\hline
Use Case 7 & Create Tasks\\
\hline
Use Case 8 & Edit Tasks\\
\hline
Use Case 9 & Delete Tasks\\
\hline
Use Case 10 & Complete Tasks\\
\hline
Use Case 11 & Save tasks to a file\\
\hline
Use Case 12 & Change roles\\
\hline
Use Case 13 & Exit the system\\
\hline
\end{tabular}
\label{tab:}
\end{table}

\newpage
\subsubsection{Use Case 1} \label{uc:1}

\begin{figure}[htb]
\begin{center}
\includegraphics[width=6in]{StartSystemDiagram}
\caption{Use Case diagram: Starting the system.}
\end{center}
\end{figure}

\noindent
{\bf Name}\\
Starting the system

\noindent
{\bf Summary}\\
The initialization and loading of the program.

\noindent
{\bf Actors}\\
Project Manager, Employee

\noindent
{\bf Precondition}\\
The system has not started.

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The user starts the system from the operating system.
\item The user is prompted to select their role as either the project manager or an employee.
\item The application window appears with the tree, task and GANTT views visible.
\end{enumerate}

\noindent
{\bf Exceptions}\\
None.

\noindent
{\bf Postcondition}\\
The system is loaded and ready to use.

\noindent
{\bf Priority}\\
Must

\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.


\newpage
\subsubsection{Use Case 2} \label{uc:2}

\begin{figure}[htb]
\begin{center}
\includegraphics[width=6in]{LoadFileDiagram}
\caption{Use Case diagram: Load the tasks file.}
\end{center}
\end{figure}

\noindent
{\bf Name}\\
Load the tasks file

\noindent
{\bf Summary}\\
The program accepts an .xml file containing a list of the tasks to be viewed. These tasks are displayed by the system.

\noindent
{\bf Actors}\\
Project Manager, Employee

\noindent
{\bf Precondition}\\
The system has started.

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The user user selects an .xml file to load tasks from.
\item The system reads the file and creates the tasks according to its specifications.
\item The system updates each of the views with the new task information.
\end{enumerate}

\noindent
{\bf Exceptions}\\
If a file type other than a .xml file is chosen, the system displays an error and prompts the user to select a different file.

\noindent
{\bf Postcondition}\\
The tasks within the file are ready to be displayed and manipulated by the system.

\noindent
{\bf Priority}\\
Must

\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.

\newpage
\subsubsection{Use Case 3} \label{uc:3}

\begin{figure}[htb]
\begin{center}
\includegraphics[width=7in]{ViewTasksDiagram}
\caption{Use Case diagram: View list of tasks.}
\end{center}
\end{figure}

\noindent
{\bf Name}\\
View list of Tasks

\noindent
{\bf Summary}\\
The user sees the list of tasks. 

\noindent
{\bf Actors}\\
Project Manager, Employee

\noindent
{\bf Precondition}\\
\vspace*{-0.2in}
\begin{enumerate}
\item Program is started.
\item Tasks are loaded.
\end{enumerate}

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The user sees a list of tasks:
\begin{enumerate}
\item User can see Parent/Child relationships of the tasks in the list.
\item Tasks are sorted in Before/After dependency order.
\end{enumerate}
\end{enumerate}

\noindent
{\bf Exceptions}\\
If there are no tasks to display, the message "No tasks to display" will be indicated.

\noindent
{\bf Postcondition}\\
The user can select tasks.


\noindent
{\bf Priority}\\
Must

\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.


\newpage
\subsubsection{Use Case 4} \label{uc:4}

\begin{figure}[htb]
\begin{center}
\includegraphics[width=7in]{SelectTask.jpg}
\caption{Use Case diagram: Select a task.}
\end{center}
\end{figure}

\noindent
{\bf Name}\\
Select a Task

\noindent
{\bf Summary}\\
The user selects a task from the list of tasks.

\noindent
{\bf Actors}\\
Project Manager, Employee

\noindent
{\bf Precondition}\\
\vspace*{-0.2in}
\begin{enumerate}
\item Program is started.
\item Tasks are loaded.
\item There are tasks in the task list.
\end{enumerate}

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The user selects a task from task list.
\item User sees task details, and if the task has subtasks the details of those tasks are also listed.
\end{enumerate}

\noindent
{\bf Exceptions}\\
If there are no tasks, the user cannot select any tasks.

\noindent
{\bf Postcondition}\\
The task(s) details are available to perform actions such as edit, complete, delete.

\noindent
{\bf Priority}\\
Must

\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.


\newpage
\subsubsection{Use Case 8} \label{uc:8}

\begin{figure}[htb]
\begin{center}
\includegraphics[width=6in]{EditTasksDiagram}
\caption{Use Case diagram: Edit tasks in a file.}
\end{center}
\end{figure}

\noindent
{\bf Name}\\
Edit Tasks

\noindent
{\bf Summary}\\
The user is trying to edit and change a task. This requires the user to have the clearance to do so. The user must be identified.

\noindent
{\bf Actors}\\
Project Manager

\noindent
{\bf Precondition}\\
There must be a task available to edit.

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The user clicks on the edit button in the tasks view.
\item The system checks if the user is allowed to edit tasks.
\item The system grants the user the ability to edit tasks.
\item  The user modifies a task.
\item  The system updates the task and updates all the task management system views to display that change.
\end{enumerate}

\noindent
{\bf Exceptions}\\
If the user does not have the necessary clearance, the message "You are NOT allowed to edit tasks." will be displayed.

\noindent
{\bf Postcondition}\\
A valid user has been granted clearance to edit tasks.

\noindent
{\bf Priority}\\
Must

\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.


\newpage
\subsubsection{Use Case 9} \label{uc:9}

\begin{figure}[htb]
\begin{center}
\includegraphics[width=6in]{DeleteTasksDiagram}
\caption{Use Case diagram: Deletes tasks from a file.}
\end{center}
\end{figure}

\noindent
{\bf Name}\\
Delete Tasks

\noindent
{\bf Summary}\\
The user is trying to delete a task. This requires the user to have the clearance to do so. The user must be identified.

\noindent
{\bf Actors}\\
Project Manager

\noindent
{\bf Precondition}\\
The user must have the clearance to delete a task.

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The user clicks on the delete button in the tasks view.
\item The system checks if the user is allowed to delete tasks.
\item The system grants the user the ability to delete tasks.
\item  The user deletes a task.
\item  The system updates the task and updates all the task management system views to remove display of the deleted task.
\end{enumerate}

\noindent
{\bf Exceptions}\\
If the user does not have the necessary clearance, the message "You are NOT allowed to delete tasks." will be displayed.

\noindent
{\bf Postcondition}\\
A valid user has been granted clearance to edit tasks.

\noindent
{\bf Priority}\\
Must

\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.


\newpage
\subsubsection{Use Case 10} \label{uc:10}

\begin{figure}[htb]
\begin{center}
\includegraphics[width=6in]{CompleteTasksDiagram}
\caption{Use Case diagram: Completes tasks from a file.}
\end{center}
\end{figure}

\noindent
{\bf Name}\\
Complete Tasks

\noindent
{\bf Summary}\\
The user is trying to display that a task has been completed. This requires the user to have completed all subtasks (if any) of that task. The user must be identified.

\noindent
{\bf Actors}\\
Project Manager, Employee

\noindent
{\bf Precondition}\\
 The user must have completed all subtasks (if any) of a specific task.

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The user clicks on the complete button in the tasks view
\item The system checks if all subtasks of the specific task have been completed
\item The system updates all the task management system views to display the completed task.
\end{enumerate}

\noindent
{\bf Exceptions}\\
If the user does not not finish all subtasks for the specific task, the message "Not all subtasks have been completed for this task. 
Please complete all subtasks." will be displayed.

\noindent
{\bf Postcondition}\\
The task will display as completed in all the views of the task management system.

\noindent
{\bf Priority}\\
Must

\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.


\newpage
\subsubsection{Use Case 11} \label{uc:11}

\begin{figure}[htb]
\begin{center}
\includegraphics[width=6in]{SaveTasksDiagram}
\caption{Use Case diagram: Save tasks to a file.}
\end{center}
\end{figure}

\noindent
{\bf Name}\\
Save tasks to a file

\noindent
{\bf Summary}\\
The program saves all information pertaining to each task in a user-specified .xml file.

\noindent
{\bf Actors}\\
Any user.

\noindent
{\bf Precondition}\\
The system has started.

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The user selects a file to save the displayed tasks to.
\item The system iterates through each tasks and writes the appropriate xml-formatted information to the file specified by the user.
\item The system consolidates information on the employees attached to the tasks and outputs the information to a separate file.
\end{enumerate}

\noindent
{\bf Exceptions}\\
\vspace*{-0.2in}
\begin{enumerate}
\item If the file name selected by the user does not end in ".xml" it is appended to the file name.
\item If the file name selected by the user already exists, the user is prompted to decide whether or not to overwrite the existing file.
\end{enumerate}
\noindent
{\bf Postcondition}\\
The tasks in the system are recorded in a file.

\noindent
{\bf Priority}\\
Must

\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.

\newpage
\subsubsection{Use Case 12} \label{uc:12}

\begin{figure}[htb]
\begin{center}
\includegraphics[width=6in]{ChangeRoleDiagram}
\caption{Use Case diagram: Change roles.}
\end{center}
\end{figure}

\noindent
{\bf Name}\\
Change Role

\noindent
{\bf Summary}\\
The user changes their role as recognized by the system.

\noindent
{\bf Actors}\\
Project Manager, Employee

\noindent
{\bf Precondition}\\
\vspace*{-0.2in}
\begin{enumerate}
\item Program is started
\end{enumerate}

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The user selects the "Change Role" options.
\item The user chooses their new role: either employee or project manager.
\item The system adjusts the user's permissions based on this role change.
\end{enumerate}

\noindent
{\bf Exceptions}\\
\vspace*{-0.2in}

\noindent
{\bf Postcondition}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The system is ready to use under the newly selected permissions.
\end{enumerate}

\noindent
{\bf Priority}\\
Must

\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.

\newpage
\subsubsection{Use Case 13} \label{uc:13}

\begin{figure}[htb]
\begin{center}
\includegraphics[width=6in]{ExitDiagram}
\caption{Use Case diagram: Exit the system.}
\end{center}
\end{figure}

\noindent
{\bf Name}\\
Exit the system 

\noindent
{\bf Summary}\\
The user exits the system, halting it.

\noindent
{\bf Actors}\\
Project Manager, Employee

\noindent
{\bf Precondition}\\
\vspace*{-0.2in}
\begin{enumerate}
\item Program is started
\end{enumerate}

\noindent
{\bf Main Scenario}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The user instructs the system to exit
\item The system ceases operating and returns the user to the operating system
\end{enumerate}

\noindent
{\bf Exceptions}\\
\vspace*{-0.2in}

\noindent
{\bf Postcondition}\\
\vspace*{-0.2in}
\begin{enumerate}
\item The system is halted and can not be used until it is started again.
\end{enumerate}

\noindent
{\bf Priority}\\
Must

\noindent
{\bf Traces to Test Cases}\\
Add when test cases done.

\section{Non-Functional Constraints}

\section{Data Dictionary}
Not applicable

\section{References}
Not applicable

\appendix

\section{Description of File Format: Tasks}

The tasks file is an XML file containing all information regarding each task. A task may have several nested subtasks. Nesting indicates heirarchy. An example follows:
\begin{verbatim}
<task id="ID#" name="Task Name" description="Description of the task" 
  duration="#Hours" deliverable="Deliverable" deadline="Deadline date" 
  people="People assigned to task">

    <task id="ID#" name="Subtask Name" description="Description of the subtask" 
      duration="#Hours" deliverable="Deliverable" deadline="Deadline date" 
      people="People assigned to subtask">
        ...
    </task>
    ...
</task>
...
\end{verbatim}

\section{Description of File Format: Persons}

A text file containing comma-delimited information regarding the people assigned to tasks. An example follows:
\begin{verbatim}
Name, # hours, List of tasks assigned
Name 2, # hours, List of tasks assigned
...
\end{verbatim}

\end{document}
